The FolderView class is responsible for creating the 4-item
grid of the folder icon, with the preview of the first four
apps inside the folder.
However, with the deprecation of StAlign as child properties,
the folder icon stopped being horizontally centralized.
Center the folder icon horizontally again.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/817
createFolderIcon(size) {
let layout = new Clutter.GridLayout();
- let icon = new St.Widget({ layout_manager: layout,
- style_class: 'app-folder-icon' });
+ let icon = new St.Widget({
+ layout_manager: layout,
+ style_class: 'app-folder-icon',
+ x_align: Clutter.ActorAlign.CENTER,
+ });
layout.hookup_style(icon);
let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;